<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%--TP 2 du zeros....affichage a revoir!! --%>
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>personalPage</title>
   <link type="text/css" rel="stylesheet" href="inc/style.css" />
 </head>
<body>

   <p>Event"s" to accept o Deny </p>
  <br />
   <table border=1>
        <thead>
            <tr>
                <th>Event Id</th>
                 <th>Date</th>
                <th>Creator</th>
                <th>Indoor_outdoor?</th>
                <th>Description</th>
                <th>Place</th>
                <th colspan=2>Action</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach items="${eventsProposed}" var="event">
                <tr>
                    <td><c:out value="${event.idevent}" /></td>
                    <td><fmt:formatDate pattern="yyyy-MMM-dd" value="${event.date}" /></td>
                    <td><c:out value="${event.eventCreator}" /></td>
                    <td><c:out value="${event.indoor_outdoor}" /></td>
                    <td><c:out value="${event.name}" /></td>
                    <td><c:out value="${event.place}" /></td>
                    <td><a href="personalPageServlet?action=deny&pseudo=<c:out value="${pseudo}"/>&eventid=<c:out value="${event.idevent}"/>">Deny</a></td>
                    <td><a href="personalPageServlet?action=accept&pseudo=<c:out value="${pseudo}"/>&eventid=<c:out value="${event.idevent}"/>">Accept</a></td>
                </tr>
            </c:forEach>
        </tbody>
    </table>
    
    
    <br/>
    <p>Message to be read</p>
    <c:forEach items="${messagesAlert_Invitation}" var="message">
                <tr>                    
                    <td><c:out value="${message}" /></td> <br/>                                    
                </tr>
    </c:forEach>             
                <br/>
               <a href="personalPageServlet?action=messageRead&pseudo=<c:out value="${pseudo}"/>">READ?</a><br/>
    
    <p>finished reading?</p><a href="personalPageServlet?action=finishReading&pseudo=<c:out value="${pseudo}"/>">ok</a>
         
</body>
</html>